In [2]:
cd("/home/andrewburns/Data/Project01_Tests")
In [3]:
readdlm("Test_May_15_TC1000_0_ClusterDistribution.dat")
UndefVarError: readdlm not defined

Stacktrace:
 [1] top-level scope at In[3]:1
In [4]:
using DelimitedFiles
In [5]:
readdlm("Test_May_15_TC1000_0_ClusterDistribution.dat")
Out[5]:
49400×1002 Array{Any,2}:
     "#"    "The"        "cluster"   …   ""   ""   ""   ""   ""   ""  ""
     "#"    "The"        "total"         ""   ""   ""   ""   ""   ""  ""
     "#"    "Ensemble"   "Polygons"      ""   ""   ""   ""   ""   ""  ""
     "#"    "x"          ","             ""   ""   ""   ""   ""   ""  ""
     "#"   1             ","             ""   ""   ""   ""   ""   ""  ""
     "#"  -1             ","         …   ""   ""   ""   ""   ""   ""  ""
     "#"  -1             ","             ""   ""   ""   ""   ""   ""  ""
     "#"   1             ","             ""   ""   ""   ""   ""   ""  ""
     "#"    "in"         "units"         ""   ""   ""   ""   ""   ""  ""
     "#"    "Number"     "of"            ""   ""   ""   ""   ""   ""  ""
     "#"    "Surface"    "area"      …   ""   ""   ""   ""   ""   ""  ""
     "#"    "moment"     "of"            ""   ""   ""   ""   ""   ""  ""
     "#"    "mass"       "m"             ""   ""   ""   ""   ""   ""  ""
    ⋮                                ⋱  ⋮                        ⋮      
 8862.82   7            5               0    0    0    0    0    0    ""
 8863.01   7            5               0    0    0    0    0    0    ""
 8863.06   7            6            …  0    0    0    0    0    0    ""
 8863.51   7            6               0    0    0    0    0    0    ""
 8863.58   7            6               0    0    0    0    0    0    ""
 8863.66   7            6               0    0    0    0    0    0    ""
 8863.76   7            5               0    0    0    0    0    0    ""
 8863.99   7            5            …  0    0    0    0    0    0    ""
 8864.13   7            5               0    0    0    0    0    0    ""
 8864.13   7            5               0    0    0    0    0    0    ""
 8864.14   7            6               0    0    0    0    0    0    ""
 8864.33   7            6               0    0    0    0    0    0    ""
In [6]:
A=readdlm("Test_May_15_TC1000_0_ClusterDistribution.dat")
Out[6]:
49400×1002 Array{Any,2}:
     "#"    "The"        "cluster"   …   ""   ""   ""   ""   ""   ""  ""
     "#"    "The"        "total"         ""   ""   ""   ""   ""   ""  ""
     "#"    "Ensemble"   "Polygons"      ""   ""   ""   ""   ""   ""  ""
     "#"    "x"          ","             ""   ""   ""   ""   ""   ""  ""
     "#"   1             ","             ""   ""   ""   ""   ""   ""  ""
     "#"  -1             ","         …   ""   ""   ""   ""   ""   ""  ""
     "#"  -1             ","             ""   ""   ""   ""   ""   ""  ""
     "#"   1             ","             ""   ""   ""   ""   ""   ""  ""
     "#"    "in"         "units"         ""   ""   ""   ""   ""   ""  ""
     "#"    "Number"     "of"            ""   ""   ""   ""   ""   ""  ""
     "#"    "Surface"    "area"      …   ""   ""   ""   ""   ""   ""  ""
     "#"    "moment"     "of"            ""   ""   ""   ""   ""   ""  ""
     "#"    "mass"       "m"             ""   ""   ""   ""   ""   ""  ""
    ⋮                                ⋱  ⋮                        ⋮      
 8862.82   7            5               0    0    0    0    0    0    ""
 8863.01   7            5               0    0    0    0    0    0    ""
 8863.06   7            6            …  0    0    0    0    0    0    ""
 8863.51   7            6               0    0    0    0    0    0    ""
 8863.58   7            6               0    0    0    0    0    0    ""
 8863.66   7            6               0    0    0    0    0    0    ""
 8863.76   7            5               0    0    0    0    0    0    ""
 8863.99   7            5            …  0    0    0    0    0    0    ""
 8864.13   7            5               0    0    0    0    0    0    ""
 8864.13   7            5               0    0    0    0    0    0    ""
 8864.14   7            6               0    0    0    0    0    0    ""
 8864.33   7            6               0    0    0    0    0    0    ""
In [7]:
B = [1, 2]
Out[7]:
2-element Array{Int64,1}:
 1
 2
In [8]:
B=repeat(B,2)
Out[8]:
4-element Array{Int64,1}:
 1
 2
 1
 2
In [9]:
B=sort(B)
Out[9]:
4-element Array{Int64,1}:
 1
 1
 2
 2
In [10]:
B=A[1:25,:]
Out[10]:
25×1002 Array{Any,2}:
 "#"     "The"       "cluster"   …  ""      ""      ""      ""     
 "#"     "The"       "total"        ""      ""      ""      ""     
 "#"     "Ensemble"  "Polygons"     ""      ""      ""      ""     
 "#"     "x"         ","            ""      ""      ""      ""     
 "#"    1            ","            ""      ""      ""      ""     
 "#"   -1            ","         …  ""      ""      ""      ""     
 "#"   -1            ","            ""      ""      ""      ""     
 "#"    1            ","            ""      ""      ""      ""     
 "#"     "in"        "units"        ""      ""      ""      ""     
 "#"     "Number"    "of"           ""      ""      ""      ""     
 "#"     "Surface"   "area"      …  ""      ""      ""      ""     
 "#"     "moment"    "of"           ""      ""      ""      ""     
 "#"     "mass"      "m"            ""      ""      ""      ""     
 "#"     "mass"      "density"      ""      ""      ""      ""     
 "#"     "height"    "is"           ""      ""      ""      ""     
 "#"     "In"        "a"         …  ""      ""      ""      ""     
 "#"     "x"         ","            ""      ""      ""      ""     
 "#"   65            ","            ""      ""      ""      ""     
 "#"  -65            ","            ""      ""      ""      ""     
 "#"  -65            ","            ""      ""      ""      ""     
 "#"   65            ","         …  ""      ""      ""      ""     
 "#"     "in"        "units"        ""      ""      ""      ""     
 "#"     "0)"        "Time"         ""      ""      ""      ""     
 "#"     "i)"        "Number"       ""      ""      ""      ""     
 "#"     "0)"        "1)"           "997)"  "998)"  "999)"  "1000)"
In [11]:
A=A[26:49400,:]
Out[11]:
49375×1002 Array{Any,2}:
    0.002  993   0   1   1   0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  ""
    0.676  991   0   1   0   0  1  0     0  0  0  0  0  0  0  0  0  0  0  ""
    0.682  990   0   0   1   0  1  0     0  0  0  0  0  0  0  0  0  0  0  ""
    0.705  989   0   0   1   0  0  1     0  0  0  0  0  0  0  0  0  0  0  ""
    0.719  988   0   0   1   0  0  0     0  0  0  0  0  0  0  0  0  0  0  ""
    0.725  987   0   0   1   0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  ""
    0.75   986   0   0   1   0  0  0     0  0  0  0  0  0  0  0  0  0  0  ""
    0.783  985   0   0   1   0  0  0     0  0  0  0  0  0  0  0  0  0  0  ""
    0.911  168  68  26  24  13  8  7     0  0  0  0  0  0  0  0  0  0  0  ""
    0.932  168  68  25  24  13  8  7     0  0  0  0  0  0  0  0  0  0  0  ""
    0.936  168  68  24  24  13  8  7  …  0  0  0  0  0  0  0  0  0  0  0  ""
    0.939  168  68  24  24  12  8  7     0  0  0  0  0  0  0  0  0  0  0  ""
    0.942  168  68  23  24  12  8  7     0  0  0  0  0  0  0  0  0  0  0  ""
    ⋮                        ⋮        ⋱  ⋮              ⋮              ⋮    
 8862.82     7   5   6   6   5  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8863.01     7   5   6   6   5  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8863.06     7   6   7   6   4  2  4  …  0  0  0  0  0  0  0  0  0  0  0  ""
 8863.51     7   6   7   6   4  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8863.58     7   6   7   6   4  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8863.66     7   6   6   6   4  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8863.76     7   5   6   6   4  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8863.99     7   5   6   6   4  2  4  …  0  0  0  0  0  0  0  0  0  0  0  ""
 8864.13     7   5   6   6   4  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8864.13     7   5   6   6   4  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8864.14     7   6   7   6   3  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8864.33     7   6   8   6   3  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
In [12]:
time=A[:,1]
Out[12]:
49375-element Array{Any,1}:
    0.002
    0.676
    0.682
    0.705
    0.719
    0.725
    0.75 
    0.783
    0.911
    0.932
    0.936
    0.939
    0.942
    â‹®    
 8862.82 
 8863.01 
 8863.06 
 8863.51 
 8863.58 
 8863.66 
 8863.76 
 8863.99 
 8864.13 
 8864.13 
 8864.14 
 8864.33 
In [13]:
time=repeat(time,1000)
Out[13]:
49375000-element Array{Any,1}:
    0.002
    0.676
    0.682
    0.705
    0.719
    0.725
    0.75 
    0.783
    0.911
    0.932
    0.936
    0.939
    0.942
    â‹®    
 8862.82 
 8863.01 
 8863.06 
 8863.51 
 8863.58 
 8863.66 
 8863.76 
 8863.99 
 8864.13 
 8864.13 
 8864.14 
 8864.33 
In [14]:
time=sort(time)
Out[14]:
49375000-element Array{Any,1}:
    0.002
    0.002
    0.002
    0.002
    0.002
    0.002
    0.002
    0.002
    0.002
    0.002
    0.002
    0.002
    0.002
    â‹®    
 8864.33 
 8864.33 
 8864.33 
 8864.33 
 8864.33 
 8864.33 
 8864.33 
 8864.33 
 8864.33 
 8864.33 
 8864.33 
 8864.33 
In [15]:
collect(1:1:100)
Out[15]:
100-element Array{Int64,1}:
   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
   â‹®
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
In [16]:
B=A[:,2:1002]
Out[16]:
49375×1001 Array{Any,2}:
 993   0   1   1   0  0  0  0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  ""
 991   0   1   0   0  1  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  ""
 990   0   0   1   0  1  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  ""
 989   0   0   1   0  0  1  0  0  0     0  0  0  0  0  0  0  0  0  0  0  ""
 988   0   0   1   0  0  0  1  0  0     0  0  0  0  0  0  0  0  0  0  0  ""
 987   0   0   1   0  0  0  0  1  0  …  0  0  0  0  0  0  0  0  0  0  0  ""
 986   0   0   1   0  0  0  0  0  1     0  0  0  0  0  0  0  0  0  0  0  ""
 985   0   0   1   0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  ""
 168  68  26  24  13  8  7  4  5  1     0  0  0  0  0  0  0  0  0  0  0  ""
 168  68  25  24  13  8  7  3  5  1     0  0  0  0  0  0  0  0  0  0  0  ""
 168  68  24  24  13  8  7  3  5  1  …  0  0  0  0  0  0  0  0  0  0  0  ""
 168  68  24  24  12  8  7  3  4  1     0  0  0  0  0  0  0  0  0  0  0  ""
 168  68  23  24  12  8  7  3  4  1     0  0  0  0  0  0  0  0  0  0  0  ""
   ⋮                  ⋮              ⋱     ⋮              ⋮              ⋮ 
   7   5   6   6   5  2  4  3  1  0     0  0  0  0  0  0  0  0  0  0  0  ""
   7   5   6   6   5  2  4  3  1  0     0  0  0  0  0  0  0  0  0  0  0  ""
   7   6   7   6   4  2  4  3  1  0  …  0  0  0  0  0  0  0  0  0  0  0  ""
   7   6   7   6   4  2  4  3  1  0     0  0  0  0  0  0  0  0  0  0  0  ""
   7   6   7   6   4  2  4  3  1  0     0  0  0  0  0  0  0  0  0  0  0  ""
   7   6   6   6   4  2  4  3  1  0     0  0  0  0  0  0  0  0  0  0  0  ""
   7   5   6   6   4  2  4  3  1  0     0  0  0  0  0  0  0  0  0  0  0  ""
   7   5   6   6   4  2  4  2  1  0  …  0  0  0  0  0  0  0  0  0  0  0  ""
   7   5   6   6   4  2  4  2  1  0     0  0  0  0  0  0  0  0  0  0  0  ""
   7   5   6   6   4  2  4  2  1  0     0  0  0  0  0  0  0  0  0  0  0  ""
   7   6   7   6   3  2  4  2  1  0     0  0  0  0  0  0  0  0  0  0  0  ""
   7   6   8   6   3  2  4  2  1  0     0  0  0  0  0  0  0  0  0  0  0  ""
In [17]:
B=A[:,2:1001]
Out[17]:
49375×1000 Array{Any,2}:
 993   0   1   1   0  0  0  0  0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
 991   0   1   0   0  1  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 990   0   0   1   0  1  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 989   0   0   1   0  0  1  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 988   0   0   1   0  0  0  1  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 987   0   0   1   0  0  0  0  1  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
 986   0   0   1   0  0  0  0  0  1  0     0  0  0  0  0  0  0  0  0  0  0  0
 985   0   0   1   0  0  0  0  0  0  1     0  0  0  0  0  0  0  0  0  0  0  0
 168  68  26  24  13  8  7  4  5  1  1     0  0  0  0  0  0  0  0  0  0  0  0
 168  68  25  24  13  8  7  3  5  1  2     0  0  0  0  0  0  0  0  0  0  0  0
 168  68  24  24  13  8  7  3  5  1  2  …  0  0  0  0  0  0  0  0  0  0  0  0
 168  68  24  24  12  8  7  3  4  1  2     0  0  0  0  0  0  0  0  0  0  0  0
 168  68  23  24  12  8  7  3  4  1  2     0  0  0  0  0  0  0  0  0  0  0  0
   ⋮                  ⋮              ⋮  ⋱        ⋮              ⋮            
   7   5   6   6   5  2  4  3  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   5   6   6   5  2  4  3  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   6   7   6   4  2  4  3  1  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
   7   6   7   6   4  2  4  3  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   6   7   6   4  2  4  3  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   6   6   6   4  2  4  3  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   5   6   6   4  2  4  3  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   5   6   6   4  2  4  2  1  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
   7   5   6   6   4  2  4  2  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   5   6   6   4  2  4  2  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   6   7   6   3  2  4  2  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   6   8   6   3  2  4  2  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
In [18]:
B=transpose(B)
Out[18]:
1000×49375 LinearAlgebra.Transpose{Any,Array{Any,2}}:
 993  991  990  989  988  987  986  …  7  7  7  7  7  7  7  7  7  7  7  7
   0    0    0    0    0    0    0     5  5  6  6  6  6  5  5  5  5  6  6
   1    1    0    0    0    0    0     6  6  7  7  7  6  6  6  6  6  7  8
   1    0    1    1    1    1    1     6  6  6  6  6  6  6  6  6  6  6  6
   0    0    0    0    0    0    0     5  5  4  4  4  4  4  4  4  4  3  3
   0    1    1    0    0    0    0  …  2  2  2  2  2  2  2  2  2  2  2  2
   0    0    0    1    0    0    0     4  4  4  4  4  4  4  4  4  4  4  4
   0    0    0    0    1    0    0     3  3  3  3  3  3  3  2  2  2  2  2
   0    0    0    0    0    1    0     1  1  1  1  1  1  1  1  1  1  1  1
   0    0    0    0    0    0    1     0  0  0  0  0  0  0  0  0  0  0  0
   0    0    0    0    0    0    0  …  0  0  0  0  0  0  0  0  0  0  0  0
   0    0    0    0    0    0    0     3  3  3  3  3  3  3  2  2  2  2  2
   0    0    0    0    0    0    0     2  2  2  2  3  3  3  3  3  2  2  2
   ⋮                        ⋮       ⋱        ⋮              ⋮            
   0    0    0    0    0    0    0     0  0  0  0  0  0  0  0  0  0  0  0
   0    0    0    0    0    0    0     0  0  0  0  0  0  0  0  0  0  0  0
   0    0    0    0    0    0    0  …  0  0  0  0  0  0  0  0  0  0  0  0
   0    0    0    0    0    0    0     0  0  0  0  0  0  0  0  0  0  0  0
   0    0    0    0    0    0    0     0  0  0  0  0  0  0  0  0  0  0  0
   0    0    0    0    0    0    0     0  0  0  0  0  0  0  0  0  0  0  0
   0    0    0    0    0    0    0     0  0  0  0  0  0  0  0  0  0  0  0
   0    0    0    0    0    0    0  …  0  0  0  0  0  0  0  0  0  0  0  0
   0    0    0    0    0    0    0     0  0  0  0  0  0  0  0  0  0  0  0
   0    0    0    0    0    0    0     0  0  0  0  0  0  0  0  0  0  0  0
   0    0    0    0    0    0    0     0  0  0  0  0  0  0  0  0  0  0  0
   0    0    0    0    0    0    0     0  0  0  0  0  0  0  0  0  0  0  0
In [19]:
R=[1,2,3;4,5,6;7,8,9]
syntax: unexpected semicolon in array expression
In [20]:
R=[1,2,3; 4,5,6; 7,8,9]
syntax: unexpected semicolon in array expression
In [21]:
T=B[:,1]
Out[21]:
3×3 Array{Int64,2}:
 1  2  3
 4  5  6
 7  8  9
In [22]:
sz = size(R)
Out[22]:
(3, 3)
In [23]:
sz(2)
MethodError: objects of type Tuple{Int64,Int64} are not callable

Stacktrace:
 [1] top-level scope at In[23]:1
In [24]:
sz[2]
Out[24]:
3
In [29]:
M=R[:,1]
for i in 2:sz[2]
    M=vcat(M,R[:,i])
end
In [30]:
M
Out[30]:
9-element Array{Int64,1}:
 1
 4
 7
 2
 5
 8
 3
 6
 9
In [31]:
T=B[:,1]
Out[31]:
1000-element Array{Any,1}:
 993
   0
   1
   1
   0
   0
   0
   0
   0
   0
   0
   0
   0
   â‹®
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
In [32]:
sz=size(B)
Out[32]:
(1000, 49375)
In [36]:
c
UndefVarError: c not defined

Stacktrace:
 [1] top-level scope at In[36]:1
In [35]:
T=B[:,1]
for i in 2:sz[2]
    T=vcat(T,B[:,i])
end
T
Out[35]:
49375000-element Array{Any,1}:
 993
   0
   1
   1
   0
   0
   0
   0
   0
   0
   0
   0
   0
   â‹®
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
In [37]:
H=collect(1:1:1000)
Out[37]:
1000-element Array{Int64,1}:
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
    â‹®
  989
  990
  991
  992
  993
  994
  995
  996
  997
  998
  999
 1000
In [38]:
H=repeat(H, 49375)
Out[38]:
49375000-element Array{Int64,1}:
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
    â‹®
  989
  990
  991
  992
  993
  994
  995
  996
  997
  998
  999
 1000
In [39]:
I=hcat(time, H, T)
Out[39]:
49375000×3 Array{Any,2}:
    0.002     1  993
    0.002     2    0
    0.002     3    1
    0.002     4    1
    0.002     5    0
    0.002     6    0
    0.002     7    0
    0.002     8    0
    0.002     9    0
    0.002    10    0
    0.002    11    0
    0.002    12    0
    0.002    13    0
    â‹®               
 8864.33    989    0
 8864.33    990    0
 8864.33    991    0
 8864.33    992    0
 8864.33    993    0
 8864.33    994    0
 8864.33    995    0
 8864.33    996    0
 8864.33    997    0
 8864.33    998    0
 8864.33    999    0
 8864.33   1000    0
In [40]:
writedlm("May_15_TC_0_State.txt", I)
In [1]:
time=A[:,1]
UndefVarError: A not defined

Stacktrace:
 [1] top-level scope at In[1]:1
In [2]:
A=readdlm("Test_May_15_TC1000_0_ClusterDistribution.dat")
UndefVarError: readdlm not defined

Stacktrace:
 [1] top-level scope at In[2]:1
In [3]:
using DelimitedFiles
In [4]:
A=readdlm("Test_May_15_TC1000_0_ClusterDistribution.dat")
ArgumentError: Cannot open 'Test_May_15_TC1000_0_ClusterDistribution.dat': not a file

Stacktrace:
 [1] #readdlm_auto#9(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::String, ::Char, ::Type, ::Char, ::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/DelimitedFiles/src/DelimitedFiles.jl:233
 [2] readdlm_auto at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/DelimitedFiles/src/DelimitedFiles.jl:233 [inlined]
 [3] #readdlm#5 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/DelimitedFiles/src/DelimitedFiles.jl:172 [inlined]
 [4] readdlm at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/DelimitedFiles/src/DelimitedFiles.jl:172 [inlined]
 [5] #readdlm#3 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/DelimitedFiles/src/DelimitedFiles.jl:118 [inlined]
 [6] readdlm(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/DelimitedFiles/src/DelimitedFiles.jl:118
 [7] top-level scope at In[4]:1
In [5]:
cd("/home/andrewburns/Data/Project01_Tests")
In [6]:
A=readdlm("Test_May_15_TC1000_0_ClusterDistribution.dat")
Out[6]:
49400×1002 Array{Any,2}:
     "#"    "The"        "cluster"   …   ""   ""   ""   ""   ""   ""  ""
     "#"    "The"        "total"         ""   ""   ""   ""   ""   ""  ""
     "#"    "Ensemble"   "Polygons"      ""   ""   ""   ""   ""   ""  ""
     "#"    "x"          ","             ""   ""   ""   ""   ""   ""  ""
     "#"   1             ","             ""   ""   ""   ""   ""   ""  ""
     "#"  -1             ","         …   ""   ""   ""   ""   ""   ""  ""
     "#"  -1             ","             ""   ""   ""   ""   ""   ""  ""
     "#"   1             ","             ""   ""   ""   ""   ""   ""  ""
     "#"    "in"         "units"         ""   ""   ""   ""   ""   ""  ""
     "#"    "Number"     "of"            ""   ""   ""   ""   ""   ""  ""
     "#"    "Surface"    "area"      …   ""   ""   ""   ""   ""   ""  ""
     "#"    "moment"     "of"            ""   ""   ""   ""   ""   ""  ""
     "#"    "mass"       "m"             ""   ""   ""   ""   ""   ""  ""
    ⋮                                ⋱  ⋮                        ⋮      
 8862.82   7            5               0    0    0    0    0    0    ""
 8863.01   7            5               0    0    0    0    0    0    ""
 8863.06   7            6            …  0    0    0    0    0    0    ""
 8863.51   7            6               0    0    0    0    0    0    ""
 8863.58   7            6               0    0    0    0    0    0    ""
 8863.66   7            6               0    0    0    0    0    0    ""
 8863.76   7            5               0    0    0    0    0    0    ""
 8863.99   7            5            …  0    0    0    0    0    0    ""
 8864.13   7            5               0    0    0    0    0    0    ""
 8864.13   7            5               0    0    0    0    0    0    ""
 8864.14   7            6               0    0    0    0    0    0    ""
 8864.33   7            6               0    0    0    0    0    0    ""
In [7]:
A=A[26:49400,:]
Out[7]:
49375×1002 Array{Any,2}:
    0.002  993   0   1   1   0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  ""
    0.676  991   0   1   0   0  1  0     0  0  0  0  0  0  0  0  0  0  0  ""
    0.682  990   0   0   1   0  1  0     0  0  0  0  0  0  0  0  0  0  0  ""
    0.705  989   0   0   1   0  0  1     0  0  0  0  0  0  0  0  0  0  0  ""
    0.719  988   0   0   1   0  0  0     0  0  0  0  0  0  0  0  0  0  0  ""
    0.725  987   0   0   1   0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  ""
    0.75   986   0   0   1   0  0  0     0  0  0  0  0  0  0  0  0  0  0  ""
    0.783  985   0   0   1   0  0  0     0  0  0  0  0  0  0  0  0  0  0  ""
    0.911  168  68  26  24  13  8  7     0  0  0  0  0  0  0  0  0  0  0  ""
    0.932  168  68  25  24  13  8  7     0  0  0  0  0  0  0  0  0  0  0  ""
    0.936  168  68  24  24  13  8  7  …  0  0  0  0  0  0  0  0  0  0  0  ""
    0.939  168  68  24  24  12  8  7     0  0  0  0  0  0  0  0  0  0  0  ""
    0.942  168  68  23  24  12  8  7     0  0  0  0  0  0  0  0  0  0  0  ""
    ⋮                        ⋮        ⋱  ⋮              ⋮              ⋮    
 8862.82     7   5   6   6   5  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8863.01     7   5   6   6   5  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8863.06     7   6   7   6   4  2  4  …  0  0  0  0  0  0  0  0  0  0  0  ""
 8863.51     7   6   7   6   4  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8863.58     7   6   7   6   4  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8863.66     7   6   6   6   4  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8863.76     7   5   6   6   4  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8863.99     7   5   6   6   4  2  4  …  0  0  0  0  0  0  0  0  0  0  0  ""
 8864.13     7   5   6   6   4  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8864.13     7   5   6   6   4  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8864.14     7   6   7   6   3  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
 8864.33     7   6   8   6   3  2  4     0  0  0  0  0  0  0  0  0  0  0  ""
In [8]:
time=A[:,1]
Out[8]:
49375-element Array{Any,1}:
    0.002
    0.676
    0.682
    0.705
    0.719
    0.725
    0.75 
    0.783
    0.911
    0.932
    0.936
    0.939
    0.942
    â‹®    
 8862.82 
 8863.01 
 8863.06 
 8863.51 
 8863.58 
 8863.66 
 8863.76 
 8863.99 
 8864.13 
 8864.13 
 8864.14 
 8864.33 
In [9]:
time=time[1:100:end]
Out[9]:
494-element Array{Any,1}:
    0.002
    2.338
    4.01 
    5.614
    7.873
   10.522
   13.358
   16.284
   20.589
   25.198
   31.107
   37.346
   45.742
    â‹®    
 8674.21 
 8691.77 
 8707.76 
 8724    
 8738.78 
 8753.34 
 8766.54 
 8784.4  
 8801.29 
 8817.17 
 8832.75 
 8851.77 
In [10]:
time=repeat(time, 1000)
Out[10]:
494000-element Array{Any,1}:
    0.002
    2.338
    4.01 
    5.614
    7.873
   10.522
   13.358
   16.284
   20.589
   25.198
   31.107
   37.346
   45.742
    â‹®    
 8674.21 
 8691.77 
 8707.76 
 8724    
 8738.78 
 8753.34 
 8766.54 
 8784.4  
 8801.29 
 8817.17 
 8832.75 
 8851.77 
In [11]:
time=sort(time)
Out[11]:
494000-element Array{Any,1}:
    0.002
    0.002
    0.002
    0.002
    0.002
    0.002
    0.002
    0.002
    0.002
    0.002
    0.002
    0.002
    0.002
    â‹®    
 8851.77 
 8851.77 
 8851.77 
 8851.77 
 8851.77 
 8851.77 
 8851.77 
 8851.77 
 8851.77 
 8851.77 
 8851.77 
 8851.77 
In [12]:
B=A[:,2:1001]
Out[12]:
49375×1000 Array{Any,2}:
 993   0   1   1   0  0  0  0  0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
 991   0   1   0   0  1  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 990   0   0   1   0  1  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 989   0   0   1   0  0  1  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 988   0   0   1   0  0  0  1  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 987   0   0   1   0  0  0  0  1  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
 986   0   0   1   0  0  0  0  0  1  0     0  0  0  0  0  0  0  0  0  0  0  0
 985   0   0   1   0  0  0  0  0  0  1     0  0  0  0  0  0  0  0  0  0  0  0
 168  68  26  24  13  8  7  4  5  1  1     0  0  0  0  0  0  0  0  0  0  0  0
 168  68  25  24  13  8  7  3  5  1  2     0  0  0  0  0  0  0  0  0  0  0  0
 168  68  24  24  13  8  7  3  5  1  2  …  0  0  0  0  0  0  0  0  0  0  0  0
 168  68  24  24  12  8  7  3  4  1  2     0  0  0  0  0  0  0  0  0  0  0  0
 168  68  23  24  12  8  7  3  4  1  2     0  0  0  0  0  0  0  0  0  0  0  0
   ⋮                  ⋮              ⋮  ⋱        ⋮              ⋮            
   7   5   6   6   5  2  4  3  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   5   6   6   5  2  4  3  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   6   7   6   4  2  4  3  1  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
   7   6   7   6   4  2  4  3  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   6   7   6   4  2  4  3  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   6   6   6   4  2  4  3  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   5   6   6   4  2  4  3  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   5   6   6   4  2  4  2  1  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
   7   5   6   6   4  2  4  2  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   5   6   6   4  2  4  2  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   6   7   6   3  2  4  2  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   7   6   8   6   3  2  4  2  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
In [14]:
C=B[1:100:end,:]
Out[14]:
494×1000 Array{Any,2}:
 993   0   1   1   0   0   0  0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
 188  63  25  22  14   7   5  2  3  1     0  0  0  0  0  0  0  0  0  0  0  0
 181  59  33  20  13   6   7  1  6  4     0  0  0  0  0  0  0  0  0  0  0  0
 152  58  36  15  13   9   7  6  1  3     0  0  0  0  0  0  0  0  0  0  0  0
 122  49  21  16  16   9  10  5  3  2     0  0  0  0  0  0  0  0  0  0  0  0
  77  34  25  13  12   9   9  6  6  0  …  0  0  0  0  0  0  0  0  0  0  0  0
  79  35  19  15  15   7   7  4  6  0     0  0  0  0  0  0  0  0  0  0  0  0
  56  31  24  14  11   7   5  4  6  4     0  0  0  0  0  0  0  0  0  0  0  0
  56  27  10  21   7   7   7  4  3  2     0  0  0  0  0  0  0  0  0  0  0  0
  36  24   7  13   7  10   5  5  0  3     0  0  0  0  0  0  0  0  0  0  0  0
  31  24   9   9   9   6   5  6  2  1  …  0  0  0  0  0  0  0  0  0  0  0  0
  28  22   6   8   7  11   3  4  4  2     0  0  0  0  0  0  0  0  0  0  0  0
  23  19   5   8   3   7   5  1  2  2     0  0  0  0  0  0  0  0  0  0  0  0
   ⋮                   ⋮               ⋱        ⋮              ⋮            
  11  13   5   6   3   8   0  1  2  2     0  0  0  0  0  0  0  0  0  0  0  0
   9  11   6   3   2   6   1  3  0  0     0  0  0  0  0  0  0  0  0  0  0  0
  12  11   5   4   2   3   2  2  0  0     0  0  0  0  0  0  0  0  0  0  0  0
  12  10   4   6   2   4   3  2  1  1  …  0  0  0  0  0  0  0  0  0  0  0  0
  14  10   3   7   1   4   3  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   8  10   4   7   2   2   3  0  1  2     0  0  0  0  0  0  0  0  0  0  0  0
   7   8   9   7   4   3   2  1  2  0     0  0  0  0  0  0  0  0  0  0  0  0
   5  16   7   3   2   3   3  0  2  2     0  0  0  0  0  0  0  0  0  0  0  0
   4  14   5   4   4   2   4  3  2  2  …  0  0  0  0  0  0  0  0  0  0  0  0
   9  10   3   3   5   1   3  5  0  1     0  0  0  0  0  0  0  0  0  0  0  0
   7  12   6   2   3   3   2  1  0  2     0  0  0  0  0  0  0  0  0  0  0  0
   7   8   5   4   3   2   4  1  2  0     0  0  0  0  0  0  0  0  0  0  0  0
In [15]:
C=transpose(C)
Out[15]:
1000×494 LinearAlgebra.Transpose{Any,Array{Any,2}}:
 993  188  181  152  122  77  79  56  56  …  12  14   8  7   5   4   9   7  7
   0   63   59   58   49  34  35  31  27     10  10  10  8  16  14  10  12  8
   1   25   33   36   21  25  19  24  10      4   3   4  9   7   5   3   6  5
   1   22   20   15   16  13  15  14  21      6   7   7  7   3   4   3   2  4
   0   14   13   13   16  12  15  11   7      2   1   2  4   2   4   5   3  3
   0    7    6    9    9   9   7   7   7  …   4   4   2  3   3   2   1   3  2
   0    5    7    7   10   9   7   5   7      3   3   3  2   3   4   3   2  4
   0    2    1    6    5   6   4   4   4      2   0   0  1   0   3   5   1  1
   0    3    6    1    3   6   6   6   3      1   0   1  2   2   2   0   0  2
   0    1    4    3    2   0   0   4   2      1   0   2  0   2   2   1   2  0
   0    1    3    3    3   2   5   3   4  …   1   0   0  0   0   1   0   0  1
   0    1    0    2    3   2   1   1   2      0   0   0  0   0   1   1   0  1
   0    4    2    0    0   2   5   4   4      1   1   3  1   0   1   0   1  0
   ⋮                       ⋮              ⋱   ⋮                  ⋮           
   0    0    0    0    0   0   0   0   0      0   0   0  0   0   0   0   0  0
   0    0    0    0    0   0   0   0   0      0   0   0  0   0   0   0   0  0
   0    0    0    0    0   0   0   0   0  …   0   0   0  0   0   0   0   0  0
   0    0    0    0    0   0   0   0   0      0   0   0  0   0   0   0   0  0
   0    0    0    0    0   0   0   0   0      0   0   0  0   0   0   0   0  0
   0    0    0    0    0   0   0   0   0      0   0   0  0   0   0   0   0  0
   0    0    0    0    0   0   0   0   0      0   0   0  0   0   0   0   0  0
   0    0    0    0    0   0   0   0   0  …   0   0   0  0   0   0   0   0  0
   0    0    0    0    0   0   0   0   0      0   0   0  0   0   0   0   0  0
   0    0    0    0    0   0   0   0   0      0   0   0  0   0   0   0   0  0
   0    0    0    0    0   0   0   0   0      0   0   0  0   0   0   0   0  0
   0    0    0    0    0   0   0   0   0      0   0   0  0   0   0   0   0  0
In [16]:
C=vec(C)
Out[16]:
494000-element reshape(::LinearAlgebra.Transpose{Any,Array{Any,2}}, 494000) with eltype Any:
 993
   0
   1
   1
   0
   0
   0
   0
   0
   0
   0
   0
   0
   â‹®
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
   0
In [17]:
H=collect(1:1:1000)
Out[17]:
1000-element Array{Int64,1}:
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
    â‹®
  989
  990
  991
  992
  993
  994
  995
  996
  997
  998
  999
 1000
In [18]:
H=repeat(H,494)
Out[18]:
494000-element Array{Int64,1}:
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
    â‹®
  989
  990
  991
  992
  993
  994
  995
  996
  997
  998
  999
 1000
In [19]:
I=hcat(time, H, C)
Out[19]:
494000×3 Array{Any,2}:
    0.002     1  993
    0.002     2    0
    0.002     3    1
    0.002     4    1
    0.002     5    0
    0.002     6    0
    0.002     7    0
    0.002     8    0
    0.002     9    0
    0.002    10    0
    0.002    11    0
    0.002    12    0
    0.002    13    0
    â‹®               
 8851.77    989    0
 8851.77    990    0
 8851.77    991    0
 8851.77    992    0
 8851.77    993    0
 8851.77    994    0
 8851.77    995    0
 8851.77    996    0
 8851.77    997    0
 8851.77    998    0
 8851.77    999    0
 8851.77   1000    0
In [20]:
writedlm("May_15_TC_1_State.txt", I)
In [21]:
O=collect(1:1:1000)
Out[21]:
1000-element Array{Int64,1}:
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
    â‹®
  989
  990
  991
  992
  993
  994
  995
  996
  997
  998
  999
 1000
In [22]:
O=repeat(O,494)
Out[22]:
494000-element Array{Int64,1}:
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
    â‹®
  989
  990
  991
  992
  993
  994
  995
  996
  997
  998
  999
 1000
In [23]:
O=sort(O)
Out[23]:
494000-element Array{Int64,1}:
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    â‹®
 1000
 1000
 1000
 1000
 1000
 1000
 1000
 1000
 1000
 1000
 1000
 1000
In [24]:
Y=hcat(O,H,C)
Out[24]:
494000×3 Array{Any,2}:
    1     1  993
    1     2    0
    1     3    1
    1     4    1
    1     5    0
    1     6    0
    1     7    0
    1     8    0
    1     9    0
    1    10    0
    1    11    0
    1    12    0
    1    13    0
    â‹®           
 1000   989    0
 1000   990    0
 1000   991    0
 1000   992    0
 1000   993    0
 1000   994    0
 1000   995    0
 1000   996    0
 1000   997    0
 1000   998    0
 1000   999    0
 1000  1000    0
In [26]:
writedlm("May_15_TC_2_State.txt", Y)
In [27]:
log(0)
Out[27]:
-Inf
In [28]:
cd("/home/andrewburns/computation/Computation/Active/Calculate_Rate_Constants April 2019")
In [29]:
E=readdlm("Test_May_24_TC750_5_matrices.dat")
Out[29]:
562510×12 Array{Any,2}:
    "#"     "The"   "average"    …  "[needs"  "to"  "be"  "corrected]."
    "#"     "The"   "total"         ""        ""    ""    ""           
    "#"     "1)"    "row"           ""        ""    ""    ""           
    "#"     "2)"    "column"        ""        ""    ""    ""           
    "#"     "3)"    "C_Matrix"      ""        ""    ""    ""           
    "#"     "4)"    "A_Matrix"   …  ""        ""    ""    ""           
    "#"     "5)"    "dA_Matrix"     ""        ""    ""    ""           
    "#"     "6)"    "N_Matrix"      ""        ""    ""    ""           
    "#"     "7)"    "dN_Matrix"     ""        ""    ""    ""           
    "#"     "1)"    "2)"            ""        ""    ""    ""           
   1       1       0             …  ""        ""    ""    ""           
   2       1       0                ""        ""    ""    ""           
   3       1       0.044679         ""        ""    ""    ""           
   ⋮                             ⋱                  ⋮                  
 739     750       0                ""        ""    ""    ""           
 740     750       0                ""        ""    ""    ""           
 741     750       0             …  ""        ""    ""    ""           
 742     750       0                ""        ""    ""    ""           
 743     750       0                ""        ""    ""    ""           
 744     750       0                ""        ""    ""    ""           
 745     750       0                ""        ""    ""    ""           
 746     750       0             …  ""        ""    ""    ""           
 747     750       0                ""        ""    ""    ""           
 748     750       0                ""        ""    ""    ""           
 749     750       0                ""        ""    ""    ""           
 750     750       0                ""        ""    ""    ""           
In [30]:
E=E[11:562510,1:3]
Out[30]:
562500×3 Array{Any,2}:
   1    1  0        
   2    1  0        
   3    1  0.044679 
   4    1  0.0408918
   5    1  0.0449073
   6    1  0.0537912
   7    1  0.0465429
   8    1  0.0547867
   9    1  0.054221 
  10    1  0.0485632
  11    1  0.0835759
  12    1  0.050224 
  13    1  0.0543555
   â‹®                
 739  750  0        
 740  750  0        
 741  750  0        
 742  750  0        
 743  750  0        
 744  750  0        
 745  750  0        
 746  750  0        
 747  750  0        
 748  750  0        
 749  750  0        
 750  750  0        
In [32]:
Q=E=[ 1 2 2 3 4 5; 2 8 1 2 6 4]
Q=transpose(Q)
Out[32]:
6×2 LinearAlgebra.Transpose{Int64,Array{Int64,2}}:
 1  2
 2  8
 2  1
 3  2
 4  6
 5  4
In [33]:
Q=E=[ 1 2 2 3 4 5; 2 8 1 2 6 4]
Q=transpose(Q)
Out[33]:
6×2 LinearAlgebra.Transpose{Int64,Array{Int64,2}}:
 1  2
 2  8
 2  1
 3  2
 4  6
 5  4
In [40]:
J=[]
for i in 1:length(Q[:,1])
           for j in 1:length(Q[:,2])
               if i==j
                if Q[i,1] > Q[j,2]
                   append!(J,i)
                end
               end
           end
end
J
Out[40]:
2-element Array{Any,1}:
 2
 4
In [41]:
length(Q[:,1])
Out[41]:
4
In [42]:
Q=[ 1 2 2 3 4 5; 2 8 1 2 6 4]
Q=transpose(Q)
Out[42]:
6×2 LinearAlgebra.Transpose{Int64,Array{Int64,2}}:
 1  2
 2  8
 2  1
 3  2
 4  6
 5  4
In [43]:
length(Q[:,1])
Out[43]:
6
In [71]:
J=[]
for i in 1:length(Q[:,1])
           for j in 1:length(Q[:,2])
               if i==j
                if Q[i,1] > Q[j,2]
                  J=append!(J,i)
            end
               end
           end
end
J
S=Matrix(undef,length(J),2)
for i in 1:length(J)
    S[i,:]=Q[J[i],:]
end
S
Out[71]:
3×2 Array{Any,2}:
 2  1
 3  2
 5  4
In [72]:
E
Out[72]:
2×6 Array{Int64,2}:
 1  2  2  3  4  5
 2  8  1  2  6  4
In [73]:
E=readdlm("Test_May_24_TC750_5_matrices.dat")
Out[73]:
562510×12 Array{Any,2}:
    "#"     "The"   "average"    …  "[needs"  "to"  "be"  "corrected]."
    "#"     "The"   "total"         ""        ""    ""    ""           
    "#"     "1)"    "row"           ""        ""    ""    ""           
    "#"     "2)"    "column"        ""        ""    ""    ""           
    "#"     "3)"    "C_Matrix"      ""        ""    ""    ""           
    "#"     "4)"    "A_Matrix"   …  ""        ""    ""    ""           
    "#"     "5)"    "dA_Matrix"     ""        ""    ""    ""           
    "#"     "6)"    "N_Matrix"      ""        ""    ""    ""           
    "#"     "7)"    "dN_Matrix"     ""        ""    ""    ""           
    "#"     "1)"    "2)"            ""        ""    ""    ""           
   1       1       0             …  ""        ""    ""    ""           
   2       1       0                ""        ""    ""    ""           
   3       1       0.044679         ""        ""    ""    ""           
   ⋮                             ⋱                  ⋮                  
 739     750       0                ""        ""    ""    ""           
 740     750       0                ""        ""    ""    ""           
 741     750       0             …  ""        ""    ""    ""           
 742     750       0                ""        ""    ""    ""           
 743     750       0                ""        ""    ""    ""           
 744     750       0                ""        ""    ""    ""           
 745     750       0                ""        ""    ""    ""           
 746     750       0             …  ""        ""    ""    ""           
 747     750       0                ""        ""    ""    ""           
 748     750       0                ""        ""    ""    ""           
 749     750       0                ""        ""    ""    ""           
 750     750       0                ""        ""    ""    ""           
In [74]:
E=E[11:562510,1:3]
Out[74]:
562500×3 Array{Any,2}:
   1    1  0        
   2    1  0        
   3    1  0.044679 
   4    1  0.0408918
   5    1  0.0449073
   6    1  0.0537912
   7    1  0.0465429
   8    1  0.0547867
   9    1  0.054221 
  10    1  0.0485632
  11    1  0.0835759
  12    1  0.050224 
  13    1  0.0543555
   â‹®                
 739  750  0        
 740  750  0        
 741  750  0        
 742  750  0        
 743  750  0        
 744  750  0        
 745  750  0        
 746  750  0        
 747  750  0        
 748  750  0        
 749  750  0        
 750  750  0        
In [ ]:
J=[]
for i in 1:length(E[:,1])
           for j in 1:length(E[:,2])
               if i==j
                if E[i,1] > E[j,2]
                  J=append!(J,i)
            end
               end
           end
end
J
S=Matrix(undef,length(J),3)
for i in 1:length(J)
    S[i,:]=E[J[i],:]
end
S
In [1]:
E=readdlm("Test_May_24_TC750_5_matrices.dat")
UndefVarError: readdlm not defined

Stacktrace:
 [1] top-level scope at In[1]:1
In [3]:
using DelimitedFiles
In [4]:
cd("/home/andrewburns/computation/Computation/Active/Calculate_Rate_Constants April 2019")
In [5]:
Q=[ 1 2 2 3 4 5; 2 8 1 2 6 4]
Q=transpose(Q)
Out[5]:
6×2 LinearAlgebra.Transpose{Int64,Array{Int64,2}}:
 1  2
 2  8
 2  1
 3  2
 4  6
 5  4
In [6]:
J=[]
for i in 1:size(Q,1)
    if Q[i,1]>Q[i,2]
        append!(J,i)
    end
end
J
Out[6]:
3-element Array{Any,1}:
 3
 4
 6
In [7]:
E=readdlm("Test_May_24_TC750_5_matrices.dat")
Out[7]:
562510×12 Array{Any,2}:
    "#"     "The"   "average"    …  "[needs"  "to"  "be"  "corrected]."
    "#"     "The"   "total"         ""        ""    ""    ""           
    "#"     "1)"    "row"           ""        ""    ""    ""           
    "#"     "2)"    "column"        ""        ""    ""    ""           
    "#"     "3)"    "C_Matrix"      ""        ""    ""    ""           
    "#"     "4)"    "A_Matrix"   …  ""        ""    ""    ""           
    "#"     "5)"    "dA_Matrix"     ""        ""    ""    ""           
    "#"     "6)"    "N_Matrix"      ""        ""    ""    ""           
    "#"     "7)"    "dN_Matrix"     ""        ""    ""    ""           
    "#"     "1)"    "2)"            ""        ""    ""    ""           
   1       1       0             …  ""        ""    ""    ""           
   2       1       0                ""        ""    ""    ""           
   3       1       0.044679         ""        ""    ""    ""           
   ⋮                             ⋱                  ⋮                  
 739     750       0                ""        ""    ""    ""           
 740     750       0                ""        ""    ""    ""           
 741     750       0             …  ""        ""    ""    ""           
 742     750       0                ""        ""    ""    ""           
 743     750       0                ""        ""    ""    ""           
 744     750       0                ""        ""    ""    ""           
 745     750       0                ""        ""    ""    ""           
 746     750       0             …  ""        ""    ""    ""           
 747     750       0                ""        ""    ""    ""           
 748     750       0                ""        ""    ""    ""           
 749     750       0                ""        ""    ""    ""           
 750     750       0                ""        ""    ""    ""           
In [8]:
E=E[11:562510,1:3]
Out[8]:
562500×3 Array{Any,2}:
   1    1  0        
   2    1  0        
   3    1  0.044679 
   4    1  0.0408918
   5    1  0.0449073
   6    1  0.0537912
   7    1  0.0465429
   8    1  0.0547867
   9    1  0.054221 
  10    1  0.0485632
  11    1  0.0835759
  12    1  0.050224 
  13    1  0.0543555
   â‹®                
 739  750  0        
 740  750  0        
 741  750  0        
 742  750  0        
 743  750  0        
 744  750  0        
 745  750  0        
 746  750  0        
 747  750  0        
 748  750  0        
 749  750  0        
 750  750  0        
In [9]:
J=[]
for i in 1:size(E,1)
    if E[i,1]>E[i,2]
        append!(J,i)
    end
end
J
Out[9]:
280875-element Array{Any,1}:
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
      â‹®
 558749
 558750
 559497
 559498
 559499
 559500
 560248
 560249
 560250
 560999
 561000
 561750
In [10]:
S=Matrix(undef,length(J),3)
for i in 1:length(J)
    S[i,:]=E[J[i],:]
end
S
Out[10]:
280875×3 Array{Any,2}:
   2    1  0        
   3    1  0.044679 
   4    1  0.0408918
   5    1  0.0449073
   6    1  0.0537912
   7    1  0.0465429
   8    1  0.0547867
   9    1  0.054221 
  10    1  0.0485632
  11    1  0.0835759
  12    1  0.050224 
  13    1  0.0543555
  14    1  0.0445177
   â‹®                
 749  745  0        
 750  745  0        
 747  746  0        
 748  746  0        
 749  746  0        
 750  746  0        
 748  747  0        
 749  747  0        
 750  747  0        
 749  748  0        
 750  748  0        
 750  749  0        
In [12]:
writedlm("Test.txt", S)
In [1]:
using DelimitedFiles
In [2]:
cd("/home/andrewburns/Data/Project01_Tests")
In [5]:
readdlm("TS_750_50_ClusterDistribution.dat")
Out[5]:
62497×752 Array{Any,2}:
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               …   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               …   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               …   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
     ⋮                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ⋱  ⋮                        ⋮      
 12627                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  …  0    0    0    0    0    0    ""
 12627                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     0    0    0    0    0    0    ""
 12627.3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0    0    0    0    0    0    ""
 12627.4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0    0    0    0    0    0    ""
 12627.6                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0    0    0    0    0    0    ""
 12627.8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                …  0    0    0    0    0    0    ""
 12627.9                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0    0    0    0    0    0    ""
 12628.3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0    0    0    0    0    0    ""
 12628.3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0    0    0    0    0    0    ""
 12628.4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0    0    0    0    0    0    ""
 12628.4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                …  0    0    0    0    0    0    ""
      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"      ""   ""   ""   ""   ""   ""  ""
In [6]:
readdlm("TS_750_50_ClusterDistribution.dat")
Out[6]:
62497×752 Array{Any,2}:
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               …   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               …   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               …   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
      "#"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ""   ""   ""   ""   ""   ""  ""
     ⋮                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ⋱  ⋮                        ⋮      
 12627                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  …  0    0    0    0    0    0    ""
 12627                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     0    0    0    0    0    0    ""
 12627.3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0    0    0    0    0    0    ""
 12627.4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0    0    0    0    0    0    ""
 12627.6                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0    0    0    0    0    0    ""
 12627.8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                …  0    0    0    0    0    0    ""
 12627.9                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0    0    0    0    0    0    ""
 12628.3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0    0    0    0    0    0    ""
 12628.3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0    0    0    0    0    0    ""
 12628.4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0    0    0    0    0    0    ""
 12628.4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                …  0    0    0    0    0    0    ""
      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"      ""   ""   ""   ""   ""   ""  ""
In [7]:
readdlm("Test_May_24_TC750_3_ClusterDistribution.dat")
Out[7]:
189818×752 Array{Any,2}:
      "#"    "The"         "cluster"   …   ""   ""   ""   ""   ""   ""  ""
      "#"    "The"         "total"         ""   ""   ""   ""   ""   ""  ""
      "#"    "Ensemble"    "Polygons"      ""   ""   ""   ""   ""   ""  ""
      "#"    "x"           ","             ""   ""   ""   ""   ""   ""  ""
      "#"   1              ","             ""   ""   ""   ""   ""   ""  ""
      "#"  -1              ","         …   ""   ""   ""   ""   ""   ""  ""
      "#"  -1              ","             ""   ""   ""   ""   ""   ""  ""
      "#"   1              ","             ""   ""   ""   ""   ""   ""  ""
      "#"    "in"          "units"         ""   ""   ""   ""   ""   ""  ""
      "#"    "Number"      "of"            ""   ""   ""   ""   ""   ""  ""
      "#"    "Surface"     "area"      …   ""   ""   ""   ""   ""   ""  ""
      "#"    "moment"      "of"            ""   ""   ""   ""   ""   ""  ""
      "#"    "mass"        "m"             ""   ""   ""   ""   ""   ""  ""
     ⋮                                 ⋱  ⋮                        ⋮      
 40357.5   10             8               0    0    0    0    0    0    ""
 40357.6   10             8               0    0    0    0    0    0    ""
 40357.8   10             8               0    0    0    0    0    0    ""
 40357.8   10             8               0    0    0    0    0    0    ""
 40358     11             8            …  0    0    0    0    0    0    ""
 40358     12             9               0    0    0    0    0    0    ""
 40358.1   13             9               0    0    0    0    0    0    ""
 40358.2   13            10               0    0    0    0    0    0    ""
 40358.2   13            10               0    0    0    0    0    0    ""
 40358.2   13             9            …  0    0    0    0    0    0    ""
 40358.5   13             8               0    0    0    0    0    0    ""
 40358.5   13             9               0    0    0    0    0    0    ""
In [8]:
A=readdlm("TS_750_50_ClusterDistribution.dat")
Out[8]:
62496×752 Array{Any,2}:
      "#"    "The"         "cluster"   …   ""   ""   ""   ""   ""   ""  ""
      "#"    "The"         "total"         ""   ""   ""   ""   ""   ""  ""
      "#"    "Ensemble"    "Polygons"      ""   ""   ""   ""   ""   ""  ""
      "#"    "x"           ","             ""   ""   ""   ""   ""   ""  ""
      "#"   1              ","             ""   ""   ""   ""   ""   ""  ""
      "#"  -1              ","         …   ""   ""   ""   ""   ""   ""  ""
      "#"  -1              ","             ""   ""   ""   ""   ""   ""  ""
      "#"   1              ","             ""   ""   ""   ""   ""   ""  ""
      "#"    "in"          "units"         ""   ""   ""   ""   ""   ""  ""
      "#"    "Number"      "of"            ""   ""   ""   ""   ""   ""  ""
      "#"    "Surface"     "area"      …   ""   ""   ""   ""   ""   ""  ""
      "#"    "moment"      "of"            ""   ""   ""   ""   ""   ""  ""
      "#"    "mass"        "m"             ""   ""   ""   ""   ""   ""  ""
     ⋮                                 ⋱  ⋮                        ⋮      
 12626.8    3            10               0    0    0    0    0    0    ""
 12627      3            11            …  0    0    0    0    0    0    ""
 12627      4            12               0    0    0    0    0    0    ""
 12627.3    4            11               0    0    0    0    0    0    ""
 12627.4    3            11               0    0    0    0    0    0    ""
 12627.6    3            11               0    0    0    0    0    0    ""
 12627.8    3            11            …  0    0    0    0    0    0    ""
 12627.9    3            12               0    0    0    0    0    0    ""
 12628.3    3            13               0    0    0    0    0    0    ""
 12628.3    3            12               0    0    0    0    0    0    ""
 12628.4    3            11               0    0    0    0    0    0    ""
 12628.4    3            12            …  0    0    0    0    0    0    ""
In [9]:
A=A[20:size(A,1),:]
Out[9]:
62477×752 Array{Any,2}:
      "#"   -50        ","       …   ""       ""       ""      ""    
      "#"    50        ","           ""       ""       ""      ""    
      "#"      "in"    "units"       ""       ""       ""      ""    
      "#"      "0)"    "Time"        ""       ""       ""      ""    
      "#"      "i)"    "Number"      ""       ""       ""      ""    
      "#"      "0)"    "1)"      …   "747)"   "748)"   "749)"  "750)"
     0.002  747       0             0        0        0        ""    
     0.077  745       1             0        0        0        ""    
     0.602  744       1             0        0        0        ""    
     0.649  743       1             0        0        0        ""    
     0.662  741       1          …  0        0        0        ""    
     0.676  740       1             0        0        0        ""    
     0.692  738       1             0        0        0        ""    
     ⋮                           ⋱                    ⋮              
 12626.8      3      10          …  0        0        0        ""    
 12627        3      11             0        0        0        ""    
 12627        4      12             0        0        0        ""    
 12627.3      4      11             0        0        0        ""    
 12627.4      3      11             0        0        0        ""    
 12627.6      3      11          …  0        0        0        ""    
 12627.8      3      11             0        0        0        ""    
 12627.9      3      12             0        0        0        ""    
 12628.3      3      13             0        0        0        ""    
 12628.3      3      12             0        0        0        ""    
 12628.4      3      11          …  0        0        0        ""    
 12628.4      3      12             0        0        0        ""    
In [10]:
A=A[7:size(A,1),1:751]
Out[10]:
62471×751 Array{Any,2}:
     0.002  747   0  1  0  0  0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
     0.077  745   1  1  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.602  744   1  0  1  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.649  743   1  0  0  1  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.662  741   1  0  0  0  0  1  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.676  740   1  0  0  0  0  0  1  …  0  0  0  0  0  0  0  0  0  0  0  0
     0.692  738   1  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.769  736   1  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.778  735   1  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.789  734   1  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.805  733   1  0  0  0  0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
     0.82   732   1  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.86   731   1  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     ⋮                     ⋮           ⋱     ⋮              ⋮              ⋮
 12626.8      3  10  5  9  2  0  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12627        3  11  5  9  2  0  2  2  …  0  0  0  0  0  0  0  0  0  0  0  0
 12627        4  12  4  9  2  0  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12627.3      4  11  4  9  2  0  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12627.4      3  11  4  9  2  0  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12627.6      3  11  4  9  2  0  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12627.8      3  11  4  8  2  0  2  2  …  0  0  0  0  0  0  0  0  0  0  0  0
 12627.9      3  12  4  8  2  0  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12628.3      3  13  4  8  2  0  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12628.3      3  12  4  7  2  1  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12628.4      3  11  3  7  3  1  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12628.4      3  12  3  7  3  1  2  2  …  0  0  0  0  0  0  0  0  0  0  0  0
In [11]:
Max=[]
for i in 1:size(A,1)
    for j in 1:size(A,2)
    m=argmax(A[i,:])
    Max=append!(Max,m)
    end    
end
Max
Out[11]:
62471×750 Array{Any,2}:
 747   0  1  0  0  0  0  0  0  0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
 745   1  1  0  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 744   1  0  1  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 743   1  0  0  1  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 741   1  0  0  0  0  1  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 740   1  0  0  0  0  0  1  0  0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
 738   1  0  0  0  0  0  0  0  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 736   1  0  0  0  0  0  0  0  0  0  1     0  0  0  0  0  0  0  0  0  0  0  0
 735   1  0  0  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 734   1  0  0  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 733   1  0  0  0  0  0  0  0  0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
 732   1  0  0  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 731   1  0  0  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   ⋮               ⋮              ⋮     ⋱        ⋮              ⋮            
   3  10  5  9  2  0  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   3  11  5  9  2  0  2  2  0  1  1  0  …  0  0  0  0  0  0  0  0  0  0  0  0
   4  12  4  9  2  0  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   4  11  4  9  2  0  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   3  11  4  9  2  0  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   3  11  4  9  2  0  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   3  11  4  8  2  0  2  2  0  1  1  0  …  0  0  0  0  0  0  0  0  0  0  0  0
   3  12  4  8  2  0  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   3  13  4  8  2  0  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   3  12  4  7  2  1  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   3  11  3  7  3  1  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   3  12  3  7  3  1  2  2  0  1  1  0  …  0  0  0  0  0  0  0  0  0  0  0  0
In [28]:

Out[28]:
46915721-element Array{Any,1}:
 2
 2
 2
 2
 2
 2
 2
 2
 2
 2
 2
 2
 2
 â‹®
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
In [27]:

Out[27]:
46915721-element Array{Any,1}:
 2
 2
 2
 2
 2
 2
 2
 2
 2
 2
 2
 2
 2
 â‹®
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
In [15]:
y=[15 6 7 8 9]
Out[15]:
1×5 Array{Int64,2}:
 15  6  7  8  9
In [16]:
(findmax(y),2)
Out[16]:
((15, CartesianIndex(1, 1)), 2)
In [17]:
findmax(y)
Out[17]:
(15, CartesianIndex(1, 1))
In [18]:
findmax([1 2 3])
Out[18]:
(3, CartesianIndex(1, 3))
In [19]:
findmax([1,2,3])
Out[19]:
(3, 3)
In [20]:
p=findmax([1 2 3])
Out[20]:
(3, CartesianIndex(1, 3))
In [21]:
p(2)
MethodError: objects of type Tuple{Int64,CartesianIndex{2}} are not callable

Stacktrace:
 [1] top-level scope at In[21]:1
In [22]:
p[2]
Out[22]:
CartesianIndex(1, 3)
In [23]:
indmax([1 2 3])
UndefVarError: indmax not defined

Stacktrace:
 [1] top-level scope at In[23]:1
In [24]:
argmax([1 2 3])
Out[24]:
CartesianIndex(1, 3)
In [29]:
Max=[]
for i in 1:size(B,1)
    m=argmax(B[i,:])
    Max=append!(Max,m) 
end
Max
Out[29]:
62471-element Array{Any,1}:
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 â‹®
 2
 2
 2
 2
 2
 2
 2
 2
 2
 2
 2
 2
In [30]:
B=A[:,2:size(A,2)]
Out[30]:
62471×750 Array{Any,2}:
 747   0  1  0  0  0  0  0  0  0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
 745   1  1  0  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 744   1  0  1  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 743   1  0  0  1  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 741   1  0  0  0  0  1  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 740   1  0  0  0  0  0  1  0  0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
 738   1  0  0  0  0  0  0  0  1  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 736   1  0  0  0  0  0  0  0  0  0  1     0  0  0  0  0  0  0  0  0  0  0  0
 735   1  0  0  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 734   1  0  0  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 733   1  0  0  0  0  0  0  0  0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
 732   1  0  0  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
 731   1  0  0  0  0  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
   ⋮               ⋮              ⋮     ⋱        ⋮              ⋮            
   3  10  5  9  2  0  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   3  11  5  9  2  0  2  2  0  1  1  0  …  0  0  0  0  0  0  0  0  0  0  0  0
   4  12  4  9  2  0  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   4  11  4  9  2  0  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   3  11  4  9  2  0  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   3  11  4  9  2  0  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   3  11  4  8  2  0  2  2  0  1  1  0  …  0  0  0  0  0  0  0  0  0  0  0  0
   3  12  4  8  2  0  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   3  13  4  8  2  0  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   3  12  4  7  2  1  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   3  11  3  7  3  1  2  2  0  1  1  0     0  0  0  0  0  0  0  0  0  0  0  0
   3  12  3  7  3  1  2  2  0  1  1  0  …  0  0  0  0  0  0  0  0  0  0  0  0
In [31]:
A
Out[31]:
62471×751 Array{Any,2}:
     0.002  747   0  1  0  0  0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
     0.077  745   1  1  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.602  744   1  0  1  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.649  743   1  0  0  1  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.662  741   1  0  0  0  0  1  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.676  740   1  0  0  0  0  0  1  …  0  0  0  0  0  0  0  0  0  0  0  0
     0.692  738   1  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.769  736   1  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.778  735   1  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.789  734   1  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.805  733   1  0  0  0  0  0  0  …  0  0  0  0  0  0  0  0  0  0  0  0
     0.82   732   1  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     0.86   731   1  0  0  0  0  0  0     0  0  0  0  0  0  0  0  0  0  0  0
     ⋮                     ⋮           ⋱     ⋮              ⋮              ⋮
 12626.8      3  10  5  9  2  0  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12627        3  11  5  9  2  0  2  2  …  0  0  0  0  0  0  0  0  0  0  0  0
 12627        4  12  4  9  2  0  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12627.3      4  11  4  9  2  0  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12627.4      3  11  4  9  2  0  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12627.6      3  11  4  9  2  0  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12627.8      3  11  4  8  2  0  2  2  …  0  0  0  0  0  0  0  0  0  0  0  0
 12627.9      3  12  4  8  2  0  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12628.3      3  13  4  8  2  0  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12628.3      3  12  4  7  2  1  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12628.4      3  11  3  7  3  1  2  2     0  0  0  0  0  0  0  0  0  0  0  0
 12628.4      3  12  3  7  3  1  2  2  …  0  0  0  0  0  0  0  0  0  0  0  0
In [32]:
using PyPlot
    x = range(0,stop=2*pi,length=1000); y = sin.(3*x + 4*cos.(2*x))
    plot(x, y, color="red", linewidth=2.0, linestyle="--")
┌ Info: Precompiling PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee]
â”” @ Base loading.jl:1186
InitError: PyError (PyImport_ImportModule

The Python package matplotlib could not be found by pyimport. Usually this means
that you did not install matplotlib in the Python version being used by PyCall.

PyCall is currently configured to use the Python version at:

/usr/bin/python3

and you should use whatever mechanism you usually use (apt-get, pip, conda,
etcetera) to install the Python package containing the matplotlib module.

One alternative is to re-configure PyCall to use a different Python
version on your system: set ENV["PYTHON"] to the path/name of the python
executable you want to use, run Pkg.build("PyCall"), and re-launch Julia.

Another alternative is to configure PyCall to use a Julia-specific Python
distribution via the Conda.jl package (which installs a private Anaconda
Python distribution), which has the advantage that packages can be installed
and kept up-to-date via Julia.  As explained in the PyCall documentation,
set ENV["PYTHON"]="", run Pkg.build("PyCall"), and re-launch Julia. Then,
To install the matplotlib module, you can use `pyimport_conda("matplotlib", PKG)`,
where PKG is the Anaconda package the contains the module matplotlib,
or alternatively you can use the Conda package directly (via
`using Conda` followed by `Conda.add` etcetera).

) <class 'ImportError'>
ImportError("No module named 'matplotlib'",)

during initialization of module PyPlot

Stacktrace:
 [1] pyimport(::String) at /home/andrewburns/.julia/packages/PyCall/ttONZ/src/PyCall.jl:544
 [2] pyimport_conda(::String, ::String, ::String) at /home/andrewburns/.julia/packages/PyCall/ttONZ/src/PyCall.jl:702
 [3] pyimport_conda at /home/andrewburns/.julia/packages/PyCall/ttONZ/src/PyCall.jl:701 [inlined]
 [4] __init__() at /home/andrewburns/.julia/packages/PyPlot/cdCMF/src/init.jl:169
 [5] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:633
 [6] _require_from_serialized(::String) at ./loading.jl:684
 [7] _require(::Base.PkgId) at ./loading.jl:967
 [8] require(::Base.PkgId) at ./loading.jl:858
 [9] require(::Module, ::Symbol) at ./loading.jl:853
 [10] top-level scope at In[32]:1
In [33]:
plot(Max)
UndefVarError: plot not defined

Stacktrace:
 [1] top-level scope at In[33]:1
In [34]:
using Plots
plot(Max)
┌ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
â”” @ Base loading.jl:1186
┌ Warning: Error requiring PyPlot from Plots:
│ LoadError: PyError (PyImport_ImportModule
│ 
│ The Python package matplotlib.colors could not be found by pyimport. Usually this means
│ that you did not install matplotlib.colors in the Python version being used by PyCall.
│ 
│ PyCall is currently configured to use the Python version at:
│ 
│ /usr/bin/python3
│ 
│ and you should use whatever mechanism you usually use (apt-get, pip, conda,
│ etcetera) to install the Python package containing the matplotlib.colors module.
│ 
│ One alternative is to re-configure PyCall to use a different Python
│ version on your system: set ENV["PYTHON"] to the path/name of the python
│ executable you want to use, run Pkg.build("PyCall"), and re-launch Julia.
│ 
│ Another alternative is to configure PyCall to use a Julia-specific Python
│ distribution via the Conda.jl package (which installs a private Anaconda
│ Python distribution), which has the advantage that packages can be installed
│ and kept up-to-date via Julia.  As explained in the PyCall documentation,
│ set ENV["PYTHON"]="", run Pkg.build("PyCall"), and re-launch Julia. Then,
│ To install the matplotlib.colors module, you can use `pyimport_conda("matplotlib.colors", PKG)`,
│ where PKG is the Anaconda package the contains the module matplotlib.colors,
│ or alternatively you can use the Conda package directly (via
│ `using Conda` followed by `Conda.add` etcetera).
│ 
│ ) <class 'ImportError'>
│ ImportError("No module named 'matplotlib'",)
│ 
│ Stacktrace:
│  [1] pyimport(::String) at /home/andrewburns/.julia/packages/PyCall/ttONZ/src/PyCall.jl:544
│  [2] top-level scope at none:0
│  [3] include at ./boot.jl:326 [inlined]
│  [4] include_relative(::Module, ::String) at ./loading.jl:1038
│  [5] include at ./sysimg.jl:29 [inlined]
│  [6] include(::String) at /home/andrewburns/.julia/packages/Plots/oiirH/src/Plots.jl:1
│  [7] top-level scope at none:0
│  [8] eval at ./boot.jl:328 [inlined]
│  [9] eval at /home/andrewburns/.julia/packages/Plots/oiirH/src/Plots.jl:1 [inlined]
│  [10] (::getfield(Plots, Symbol("##295#322")))() at /home/andrewburns/.julia/packages/Requires/9Jse8/src/require.jl:67
│  [11] err(::getfield(Plots, Symbol("##295#322")), ::Module, ::String) at /home/andrewburns/.julia/packages/Requires/9Jse8/src/require.jl:38
│  [12] #294 at /home/andrewburns/.julia/packages/Requires/9Jse8/src/require.jl:66 [inlined]
│  [13] withpath(::getfield(Plots, Symbol("##294#321")), ::String) at /home/andrewburns/.julia/packages/Requires/9Jse8/src/require.jl:28
│  [14] #293 at /home/andrewburns/.julia/packages/Requires/9Jse8/src/require.jl:65 [inlined]
│  [15] listenpkg(::getfield(Plots, Symbol("##293#320")), ::Base.PkgId) at /home/andrewburns/.julia/packages/Requires/9Jse8/src/require.jl:13
│  [16] macro expansion at /home/andrewburns/.julia/packages/Requires/9Jse8/src/require.jl:64 [inlined]
│  [17] __init__() at /home/andrewburns/.julia/packages/Plots/oiirH/src/init.jl:35
│  [18] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:633
│  [19] _require_from_serialized(::String) at ./loading.jl:684
│  [20] _require(::Base.PkgId) at ./loading.jl:967
│  [21] require(::Base.PkgId) at ./loading.jl:858
│  [22] require(::Module, ::Symbol) at ./loading.jl:853
│  [23] top-level scope at In[34]:1
│  [24] eval at ./boot.jl:328 [inlined]
│  [25] softscope_include_string(::Module, ::String, ::String) at /home/andrewburns/.julia/packages/SoftGlobalScope/cSbw5/src/SoftGlobalScope.jl:218
│  [26] execute_request(::ZMQ.Socket, ::IJulia.Msg) at /home/andrewburns/.julia/packages/IJulia/4UizY/src/execute_request.jl:67
│  [27] #invokelatest#1 at ./essentials.jl:742 [inlined]
│  [28] invokelatest at ./essentials.jl:741 [inlined]
│  [29] eventloop(::ZMQ.Socket) at /home/andrewburns/.julia/packages/IJulia/4UizY/src/eventloop.jl:8
│  [30] (::getfield(IJulia, Symbol("##15#18")))() at ./task.jl:259
│ in expression starting at /home/andrewburns/.julia/packages/Plots/oiirH/src/backends/pyplot.jl:16
â”” @ Requires /home/andrewburns/.julia/packages/Requires/9Jse8/src/require.jl:40
Out[34]:
0 1×10 4 2×10 4 3×10 4 4×10 4 5×10 4 6×10 4 2 4 6 8 y1
In [35]:
M=complex(Max)
`complex` not defined on abstractly-typed arrays; please convert to a more specific type

Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] complex(::Array{Any,1}) at ./complex.jl:1013
 [3] top-level scope at In[35]:1
In [36]:
Pl=plot(Max)
Out[36]:
0 1×10 4 2×10 4 3×10 4 4×10 4 5×10 4 6×10 4 2 4 6 8 y1
In [37]:
using FastTransforms
In [40]:
Max=convert(Array{Float64,1},Max)
Out[40]:
62471-element Array{Float64,1}:
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 â‹®  
 2.0
 2.0
 2.0
 2.0
 2.0
 2.0
 2.0
 2.0
 2.0
 2.0
 2.0
 2.0
In [41]:
ω = collect(0:62470) + rand(62471)
Out[41]:
62471-element Array{Float64,1}:
     0.2406869939300056
     1.9176441063474323
     2.7456814109321375
     3.551755309702694 
     4.610582929542798 
     5.981641534327442 
     6.482930294914516 
     7.847782197875703 
     8.56719363121472  
     9.645265019935596 
    10.678865551421957 
    11.990572039476154 
    12.988937933290384 
     â‹®                 
 62459.54110318128     
 62460.585636273565    
 62461.635094558136    
 62462.82900179654     
 62463.55924711804     
 62464.0540024722      
 62465.30654275055     
 62466.51368067365     
 62467.294103187305    
 62468.35780941345     
 62469.2367930152      
 62470.680310455224    
In [46]:
w=collect(0:0.0001:1)
Out[46]:
10001-element Array{Float64,1}:
 0.0   
 0.0001
 0.0002
 0.0003
 0.0004
 0.0005
 0.0006
 0.0007
 0.0008
 0.0009
 0.001 
 0.0011
 0.0012
 â‹®     
 0.9989
 0.999 
 0.9991
 0.9992
 0.9993
 0.9994
 0.9995
 0.9996
 0.9997
 0.9998
 0.9999
 1.0   
In [47]:
Trans=nufft1(Max, w, eps())
MethodError: no method matching mul!(::Array{Complex{Float64},1}, ::FastTransforms.NUFFTPlan{1,Complex{Float64},FFTW.cFFTWPlan{Complex{Float64},1,true,2}}, ::Array{Float64,1})
Closest candidates are:
  mul!(::AbstractArray, !Matched::Number, ::AbstractArray) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/LinearAlgebra/src/generic.jl:26
  mul!(::Union{DenseArray{Complex{Float64},1}, ReinterpretArray{Complex{Float64},1,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray}, ReshapedArray{Complex{Float64},1,A,MI} where MI<:Tuple{Vararg{SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{ReinterpretArray{T,N,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray} where N where T, SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray}, SubArray{Complex{Float64},1,A,I,L} where L where I<:Tuple{Vararg{Union{Int64, AbstractRange{Int64}, AbstractCartesianIndex},N} where N} where A<:Union{ReinterpretArray{T,N,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray} where N where T, ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{ReinterpretArray{T,N,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray} where N where T, SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray} where N where T, DenseArray}}, !Matched::Union{DenseArray{Complex{Float64},1}, DenseArray{Complex{Float64},2}, ReinterpretArray{Complex{Float64},1,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray}, ReinterpretArray{Complex{Float64},2,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray}, ReshapedArray{Complex{Float64},1,A,MI} where MI<:Tuple{Vararg{SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{ReinterpretArray{T,N,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray} where N where T, SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray}, ReshapedArray{Complex{Float64},2,A,MI} where MI<:Tuple{Vararg{SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{ReinterpretArray{T,N,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray} where N where T, SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray}, SubArray{Complex{Float64},1,A,I,L} where L where I<:Tuple{Vararg{Union{Int64, AbstractRange{Int64}, AbstractCartesianIndex},N} where N} where A<:Union{ReinterpretArray{T,N,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray} where N where T, ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{ReinterpretArray{T,N,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray} where N where T, SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray} where N where T, DenseArray}, SubArray{Complex{Float64},2,A,I,L} where L where I<:Tuple{Vararg{Union{Int64, AbstractRange{Int64}, AbstractCartesianIndex},N} where N} where A<:Union{ReinterpretArray{T,N,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray} where N where T, ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{ReinterpretArray{T,N,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray} where N where T, SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray} where N where T, DenseArray}}, ::Union{DenseArray{Float64,1}, ReinterpretArray{Float64,1,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray}, ReshapedArray{Float64,1,A,MI} where MI<:Tuple{Vararg{SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{ReinterpretArray{T,N,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray} where N where T, SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray}, SubArray{Float64,1,A,I,L} where L where I<:Tuple{Vararg{Union{Int64, AbstractRange{Int64}, AbstractCartesianIndex},N} where N} where A<:Union{ReinterpretArray{T,N,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray} where N where T, ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{ReinterpretArray{T,N,S,A} where S where A<:Union{SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray} where N where T, SubArray{T,N,A,I,true} where I<:Union{Tuple{Vararg{Real,N} where N}, Tuple{AbstractUnitRange,Vararg{Any,N} where N}} where A<:DenseArray where N where T, DenseArray} where N where T, DenseArray}}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/LinearAlgebra/src/matmul.jl:69
  mul!(::AbstractArray{T,1} where T, !Matched::LinearAlgebra.Transpose{#s623,#s622} where #s622<:LinearAlgebra.AbstractTriangular where #s623, ::AbstractArray{T,1} where T) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/LinearAlgebra/src/triangular.jl:534
  ...

Stacktrace:
 [1] mul!(::Array{Complex{Float64},1}, ::FastTransforms.NUFFTPlan{1,Complex{Float64},FFTW.cFFTWPlan{Complex{Float64},1,true,2}}, ::Array{Float64,1}) at /home/andrewburns/.julia/packages/HierarchicalMatrices/yxEKb/src/HierarchicalMatrices.jl:47
 [2] *(::FastTransforms.NUFFTPlan{1,Complex{Float64},FFTW.cFFTWPlan{Complex{Float64},1,true,2}}, ::Array{Float64,1}) at /home/andrewburns/.julia/packages/FastTransforms/IvwBW/src/nufft.jl:81
 [3] nufft1(::Array{Float64,1}, ::Array{Float64,1}, ::Float64) at /home/andrewburns/.julia/packages/FastTransforms/IvwBW/src/nufft.jl:209
 [4] top-level scope at In[47]:1
In [48]:
Max=convert(Array{Complex{Float64},1},Max)
Out[48]:
62471-element Array{Complex{Float64},1}:
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
     â‹®      
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
In [49]:

DimensionMismatch("array could not be broadcast to match destination")

Stacktrace:
 [1] check_broadcast_shape at ./broadcast.jl:456 [inlined]
 [2] check_broadcast_axes at ./broadcast.jl:459 [inlined]
 [3] check_broadcast_axes at ./broadcast.jl:462 [inlined]
 [4] instantiate at ./broadcast.jl:258 [inlined]
 [5] materialize! at ./broadcast.jl:756 [inlined]
 [6] broadcast!(::typeof(*), ::Array{Complex{Float64},2}, ::Array{Complex{Float64},1}, ::Array{Complex{Float64},2}) at ./broadcast.jl:746
 [7] mul!(::Array{Complex{Float64},1}, ::FastTransforms.NUFFTPlan{1,Complex{Float64},FFTW.cFFTWPlan{Complex{Float64},1,true,2}}, ::Array{Complex{Float64},1}) at /home/andrewburns/.julia/packages/FastTransforms/IvwBW/src/nufft.jl:87
 [8] *(::FastTransforms.NUFFTPlan{1,Complex{Float64},FFTW.cFFTWPlan{Complex{Float64},1,true,2}}, ::Array{Complex{Float64},1}) at /home/andrewburns/.julia/packages/FastTransforms/IvwBW/src/nufft.jl:81
 [9] nufft1(::Array{Complex{Float64},1}, ::Array{Float64,1}, ::Float64) at /home/andrewburns/.julia/packages/FastTransforms/IvwBW/src/nufft.jl:209
 [10] top-level scope at In[49]:1
In [57]:
1/62470
Out[57]:
1.600768368817032e-5
In [58]:
w=collect(0:1.600768368817032e-5:1)
Out[58]:
62471-element Array{Float64,1}:
 0.0                   
 1.600768368817032e-5  
 3.201536737634064e-5  
 4.802305106451097e-5  
 6.403073475268129e-5  
 8.003841844085161e-5  
 9.604610212902194e-5  
 0.00011205378581719225
 0.00012806146950536257
 0.0001440691531935329 
 0.00016007683688170322
 0.00017608452056987355
 0.00019209220425804387
 â‹®                     
 0.9998239154794302    
 0.9998399231631183    
 0.9998559308468065    
 0.9998719385304946    
 0.9998879462141828    
 0.999903953897871     
 0.9999199615815592    
 0.9999359692652473    
 0.9999519769489355    
 0.9999679846326237    
 0.9999839923163119    
 1.0                   
In [59]:
Trans=nufft1(Max, w, eps())
Out[59]:
62471-element Array{Complex{Float64},1}:
  133591.99999999988 + 2.608042470034649e-10im
  133591.99977413836 - 6.745486349853616im    
   133591.9990965539 - 13.490972665919418im   
  133591.99796724645 - 20.236458913752564im   
  133591.99638621593 - 26.98194505927968im    
  133591.99435346253 - 33.72743106835238im    
  133591.99186898608 - 40.47291690691785im    
  133591.98893278683 - 47.218402540906325im   
  133591.98554486455 - 53.9638879360876im     
  133591.98170521937 - 60.709373058484516im   
  133591.97741385121 - 67.45485787388904im    
  133591.97267076035 - 74.20034234831974im    
   133591.9674759466 - 80.94582644752744im    
                     â‹®                        
 -372.17365716530577 - 1549.6363631817653im   
 -370.07086852635445 - 1549.6835759838916im   
 -367.96815153204994 - 1549.7310033395672im   
  -365.8655062007502 - 1549.7786452383293im   
  -363.7629325509339 - 1549.8265016695022im   
  -361.6604306008646 - 1549.874572622578im    
  -359.5580003689478 - 1549.9228580869458im   
  -357.4556418735517 - 1549.971358052064im    
 -355.35335513305125 - 1550.0200725073234im   
  -353.2511401658104 - 1550.069001442249im    
 -351.14899699022925 - 1550.118144846137im    
   -349.046925624576 - 1550.1675027084998im   
In [60]:
plot(Trans)
Out[60]:
- 2.0×10 4 0 2.0×10 4 4.0×10 4 6.0×10 4 8.0×10 4 1.0×10 5 1.2×10 5 - 1.0×10 5 - 7.5×10 4 - 5.0×10 4 - 2.5×10 4 0 Re(x) Im(x) y1
In [63]:
MT=[]
for i in 1:size(Trans,1)
    mt=abs(Trans[i])
    MT=append!(MT,mt)
end
MT
Out[63]:
62471-element Array{Any,1}:
 133591.99999999988  
 133591.99994443893  
 133591.99977775614  
 133591.99949995152  
 133591.99911102495  
 133591.9986109766   
 133591.99799980628  
 133591.99727751425  
 133591.99644410028  
 133591.99549956442  
 133591.99444390662  
 133591.99327712716  
 133591.99199922578  
      â‹®              
   1593.702007648546 
   1593.2581816535799
   1592.8172347302673
   1592.3791689997338
   1591.943986569623 
   1591.5116895343313
   1591.0822799747734
   1590.6557599584496
   1590.2321315392683
   1589.8113967576833
   1589.3935576402948
   1588.9786162001915
In [64]:
plot(MT)
Out[64]:
0 1×10 4 2×10 4 3×10 4 4×10 4 5×10 4 6×10 4 0 2.0×10 4 4.0×10 4 6.0×10 4 8.0×10 4 1.0×10 5 1.2×10 5 y1
In [66]:
AT=[]
for i in 1:size(Trans,1)
    at=angle(Trans[i])
    AT=append!(AT,at)
end
AT
Out[66]:
62471-element Array{Any,1}:
  1.9522444981994813e-15
 -5.0493190876140874e-5 
 -0.00010098638175410008
 -0.00015147957263077775
 -0.00020197276350585486
 -0.00025246595437845046
 -0.00030295914524839946
 -0.0003534523361154092 
 -0.000403945526977987  
 -0.0004544387178365336 
 -0.000504931908689722  
 -0.0005554250995379205 
 -0.0006059182903794943 
  â‹®                     
 -1.806500512323306     
 -1.8052102801989711    
 -1.803919343842649     
 -1.8026277075345372    
 -1.8013353755694965    
 -1.800042352256726     
 -1.7987486419199508    
 -1.797454248897223     
 -1.796159177540898     
 -1.794863432217527     
 -1.7935670173078668    
 -1.792269937206644     
In [67]:
plot(AT)
Out[67]:
0 1×10 4 2×10 4 3×10 4 4×10 4 5×10 4 6×10 4 -2.5 -2.0 -1.5 -1.0 -0.5 0.0 y1
In [68]:
using FINUFFT
In [69]:
w=collect(0:1:62470)
Out[69]:
62471-element Array{Int64,1}:
     0
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
     â‹®
 62459
 62460
 62461
 62462
 62463
 62464
 62465
 62466
 62467
 62468
 62469
 62470
In [70]:
Trans=nufft1(Max, w, eps())
MethodError: no method matching nufft1(::Array{Complex{Float64},1}, ::Array{Int64,1}, ::Float64)
Closest candidates are:
  nufft1(::AbstractArray{T,1} where T, !Matched::AbstractArray{T<:AbstractFloat,1}, ::T<:AbstractFloat) where T<:AbstractFloat at /home/andrewburns/.julia/packages/FastTransforms/IvwBW/src/nufft.jl:209

Stacktrace:
 [1] top-level scope at In[70]:1
In [71]:
Max=[]
for i in 1:size(B,1)
    m=argmax(B[i,:])
    Max=append!(Max,m) 
end
Max
Out[71]:
62471-element Array{Any,1}:
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 â‹®
 2
 2
 2
 2
 2
 2
 2
 2
 2
 2
 2
 2
In [72]:
Trans=nufft1(Max, w, eps())
MethodError: no method matching nufft1(::Array{Any,1}, ::Array{Int64,1}, ::Float64)
Closest candidates are:
  nufft1(::AbstractArray{T,1} where T, !Matched::AbstractArray{T<:AbstractFloat,1}, ::T<:AbstractFloat) where T<:AbstractFloat at /home/andrewburns/.julia/packages/FastTransforms/IvwBW/src/nufft.jl:209

Stacktrace:
 [1] top-level scope at In[72]:1
In [73]:
using FastTransforms
In [74]:
Trans=nufft1(Max, w, eps())
MethodError: no method matching nufft1(::Array{Any,1}, ::Array{Int64,1}, ::Float64)
Closest candidates are:
  nufft1(::AbstractArray{T,1} where T, !Matched::AbstractArray{T<:AbstractFloat,1}, ::T<:AbstractFloat) where T<:AbstractFloat at /home/andrewburns/.julia/packages/FastTransforms/IvwBW/src/nufft.jl:209

Stacktrace:
 [1] top-level scope at In[74]:1
In [75]:
using FINUFFT
In [76]:
nj=62471
Out[76]:
62471
In [77]:
xj=A[:,1]
Out[77]:
62471-element Array{Any,1}:
     0.002
     0.077
     0.602
     0.649
     0.662
     0.676
     0.692
     0.769
     0.778
     0.789
     0.805
     0.82 
     0.86 
     â‹®    
 12626.8  
 12627    
 12627    
 12627.3  
 12627.4  
 12627.6  
 12627.8  
 12627.9  
 12628.3  
 12628.3  
 12628.4  
 12628.4  
In [78]:
cj=Max
Out[78]:
62471-element Array{Any,1}:
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 â‹®
 2
 2
 2
 2
 2
 2
 2
 2
 2
 2
 2
 2
In [79]:
nk=62471
Out[79]:
62471
In [80]:
s=collect(0:1.600768368817032e-5:1)
Out[80]:
62471-element Array{Float64,1}:
 0.0                   
 1.600768368817032e-5  
 3.201536737634064e-5  
 4.802305106451097e-5  
 6.403073475268129e-5  
 8.003841844085161e-5  
 9.604610212902194e-5  
 0.00011205378581719225
 0.00012806146950536257
 0.0001440691531935329 
 0.00016007683688170322
 0.00017608452056987355
 0.00019209220425804387
 â‹®                     
 0.9998239154794302    
 0.9998399231631183    
 0.9998559308468065    
 0.9998719385304946    
 0.9998879462141828    
 0.999903953897871     
 0.9999199615815592    
 0.9999359692652473    
 0.9999519769489355    
 0.9999679846326237    
 0.9999839923163119    
 1.0                   
In [81]:
fk = Array{ComplexF64}(undef, nk)
Out[81]:
62471-element Array{Complex{Float64},1}:
        3.650275939e-314 + 3.5393093955e-314im     
        3.650275939e-314 + 3.63750865e-314im       
                     0.0 + 0.0im                   
                     0.0 + 6.94324115725425e-310im 
              5.012e-318 + 5.738431076726277e180im 
   5.161727554431119e-72 + 3.682536253565067e228im 
   9.683958719483267e252 + 1.7783050723264638e-19im
    8.22066989215648e223 + 3.3230408388530026e-27im
   9.016180842900297e-61 + 1.3987169534366326e-76im
   4.261855321160125e270 + 6.810031909929686e199im 
   5.081010158056052e233 + 1.2279795359071602e266im
   3.309743778967697e-33 + 3.1244191558677655e209im
   6.950431601674729e-13 + 3.128413368172075e180im 
                         â‹®                         
  3.1200005521702393e-33 + 1.2562534586249735e-71im
   3.120000552304764e-33 + 8.232982666443951e-67im 
   3.120000551989297e-33 + 8.232982666529638e-67im 
   3.120000552168663e-33 + 8.232982666528964e-67im 
  3.1200005523031875e-33 + 8.232982666528289e-67im 
   4.760743029769092e-38 + 2.990576114197272e-67im 
   7.981413897219836e-72 + 6.723254118736434e-67im 
  4.1744600091602945e-62 + 1.2450074324851655e-47im
  1.6574604271709504e-76 + 8.232982666095482e-67im 
   4.760743029974627e-38 + 3.661945007567557e-86im 
 1.8040444236337592e-153 + 8.052447584136221e-96im 
  3.0080651482774204e-67 + 7.981422533388391e-72im 
In [84]:
nufft1d3(xj,cj,1,1e-3,s)
MethodError: no method matching nufft1d3(::Array{Any,1}, ::Array{Any,1}, ::Int64, ::Float64, ::Array{Float64,1})
Closest candidates are:
  nufft1d3(!Matched::Array{Float64,N} where N, !Matched::Array{Complex{Float64},N} where N, ::Integer, ::Float64, ::Array{Float64,N} where N) at /home/andrewburns/.julia/packages/FINUFFT/bgr7t/src/FINUFFT.jl:330
  nufft1d3(!Matched::Array{Float64,N} where N, !Matched::Array{Complex{Float64},N} where N, ::Integer, ::Float64, ::Array{Float64,N} where N, !Matched::nufft_opts) at /home/andrewburns/.julia/packages/FINUFFT/bgr7t/src/FINUFFT.jl:330

Stacktrace:
 [1] top-level scope at In[84]:1
In [85]:
cj=convert(Array{Complex{Float64},1},cj)
Out[85]:
62471-element Array{Complex{Float64},1}:
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
 1.0 + 0.0im
     â‹®      
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
In [86]:
t= nufft1d3(xj,cj,1,1e-3,s)
MethodError: no method matching nufft1d3(::Array{Any,1}, ::Array{Complex{Float64},1}, ::Int64, ::Float64, ::Array{Float64,1})
Closest candidates are:
  nufft1d3(!Matched::Array{Float64,N} where N, ::Array{Complex{Float64},N} where N, ::Integer, ::Float64, ::Array{Float64,N} where N) at /home/andrewburns/.julia/packages/FINUFFT/bgr7t/src/FINUFFT.jl:330
  nufft1d3(!Matched::Array{Float64,N} where N, ::Array{Complex{Float64},N} where N, ::Integer, ::Float64, ::Array{Float64,N} where N, !Matched::nufft_opts) at /home/andrewburns/.julia/packages/FINUFFT/bgr7t/src/FINUFFT.jl:330

Stacktrace:
 [1] top-level scope at In[86]:1
In [88]:
xj=convert(Array{Float64,1},xj)
Out[88]:
62471-element Array{Float64,1}:
     0.002
     0.077
     0.602
     0.649
     0.662
     0.676
     0.692
     0.769
     0.778
     0.789
     0.805
     0.82 
     0.86 
     â‹®    
 12626.8  
 12627.0  
 12627.0  
 12627.3  
 12627.4  
 12627.6  
 12627.8  
 12627.9  
 12628.3  
 12628.3  
 12628.4  
 12628.4  
In [89]:
t= nufft1d3(xj,cj,1,1e-3,s)
Out[89]:
62471-element Array{Complex{Float64},1}:
  133654.14294902896 - 4.137852650086827im 
  132739.88053916887 + 13411.032827051084im
  130030.51901179647 + 26549.476761610073im
  125591.94852415906 + 39142.7536960607im  
  119533.49808204439 + 50937.524582769605im
  112004.28387030911 + 61702.64454187806im 
  103188.38734598327 + 71235.51161816428im 
   93299.09361330447 + 79367.35307652596im 
   82572.42165462195 + 85967.34472457285im 
   71260.17764957111 + 90945.50881890279im 
   59622.75158832575 + 94254.38122063398im 
     47921.857643045 + 95889.47640864406im 
  36413.392721392236 + 95888.60807126734im 
                     â‹®                     
  178.05953774468645 + 482.8428808175512im 
  123.63130775983201 + 507.2009228394084im 
   65.80163487046649 + 523.7863363596532im 
   5.739791566623457 + 531.9480387031459im 
  -55.24967067819097 + 531.2111089736055im 
 -115.75253106527445 + 521.3109367627593im 
  -174.2800267274033 + 502.22447135929065im
  -229.3134240393582 + 474.1956550452023im 
 -279.35703890656333 + 437.7520643814767im 
 -322.99777754245173 + 393.70999796223293im
  -358.9683977034189 + 343.1657365638021im 
 -386.21095294163956 + 287.47144250025855im
In [90]:
plot(t)
Out[90]:
- 2.0×10 4 0 2.0×10 4 4.0×10 4 6.0×10 4 8.0×10 4 1.0×10 5 1.2×10 5 0 2×10 4 4×10 4 6×10 4 8×10 4 Re(x) Im(x) y1
In [93]:
tabs=[]
for i in 1:size(t,1)
    at=abs(t[i])
    tabs=append!(tabs,at)
end
tabs
Out[93]:
62471-element Array{Any,1}:
 133654.14301308166   
 133415.6350921475    
 132713.26456233542   
 131550.34283879877   
 129934.17015685429   
 127875.62687534376   
 125388.76105363789   
 122490.39800506031   
 119199.78681567441   
 115538.29881462493   
 111529.19297765853   
 107197.46324369889   
 102569.78272048479   
      â‹®               
    514.6284548468374 
    522.0512200805146 
    527.9033825509114 
    531.9790043670445 
    534.0765566910949 
    534.007248299574  
    531.6041265342316 
    526.7315879158976 
    519.2949307059406 
    509.24957220677624
    496.6095380690314 
    481.4548062126588 
In [94]:
plot(s,tabs)
Out[94]:
0.00 0.25 0.50 0.75 1.00 0 2.0×10 4 4.0×10 4 6.0×10 4 8.0×10 4 1.0×10 5 1.2×10 5 y1
In [95]:
plot(xj,Max)
Out[95]:
0 2.0×10 3 4.0×10 3 6.0×10 3 8.0×10 3 1.0×10 4 1.2×10 4 2 4 6 8 y1
In [96]:

syntax: extra token "nbconvert" after end of expression
In [97]:

syntax: invalid operator "--"